<?php if($mode == "INDEX"){?>

 <div class="widget">
 <div id="carousel-example-generic"
				class="carousel slide">

				<div class="carousel-inner">

						<?php $i = 1; ?>
	<?php foreach($banner as $banner):?>
	 <?php
    $sql = "update banners set impressions = impressions +1 where id = $banner->id";
    DB::query($sql);
    ?>
<?php $item_class = ($i == 1) ? 'item active' : 'item'; ?>
    <div class="<?php echo $item_class; ?>">
       <a class="clicked" href="#" banner-id="<?= $banner->id; ?>" title="<?= $banner->title; ?>" >
      
       		<img class="img-responsive" alt="<?= $banner->title; ?>" src="<?= URL::base(); ?>/storage/uploads/banners/<?= $banner->file; ?>">
        </a>
     </div>
<?php $i++; ?>
<?php endforeach; ?>
			
		
		
		</div>		
		<a class="left carousel-control" href="#carousel-example-generic"
					data-slide="prev"> <span class="icon-prev"></span>
				</a> <a class="right carousel-control"
					href="#carousel-example-generic" data-slide="next"> <span
					class="icon-next"></span>
				</a>
			</div>
		</div>
		<?php }?>
<!-- widget + accordion ---->
		<!-- Closed By rahul 15/11/2014---
<?php if($mode == "DEMo"){?>
<?php foreach ($banner as $banner): ?>
    <?php
    $sql = "update banners set impressions = impressions +1 where id = $banner->id";
    DB::query($sql);
    ?>
    <div class="widget">
        <a class="clicked" href="#" banner-id="<?= $banner->id; ?>" title="<?= $banner->title; ?>" >
            <img class="img-responsive" alt="<?= $banner->title; ?>" src="<?= URL::base(); ?>/storage/uploads/banners/<?= $banner->file; ?>">
        </a>
    </div><!-- /.widget
<?php endforeach; ?>
<?php }?>
 -->
<?php if($mode == "TABINDEX"){?>
<div class="fixed-block-top">
    <?php foreach($banner as $banner):?>
     <?php
    $sql = "update banners set impressions = impressions +1 where id = $banner->id";
    DB::query($sql);
    ?>
    <div class="col-md-4 col-xs-6">
     <a class="clicked" href="#" banner-id="<?= $banner->id; ?>" title="<?= $banner->title; ?>" >
     
        <img src="<?= URL::base();?>/storage/uploads/banners/<?= $banner->file; ?>" alt="<?= $banner->title; ?>" class="img-responsive">
   </a>
    </div>
    <?php endforeach;?>



</div>

<?php }?>







